<!-- <script context="module">
	import * as d3 from 'd3';
</script> -->
<script>
	// import * as THREE from 'three';
	import * as d3 from 'd3';
	import { onMount } from 'svelte';
	let width, height, paragraphs;

	onMount(() => {
		d3.select('#main')
			.selectAll('p')
			.enter()
			.append('p')
			.transition()

			.style('color', function (d, i) {
				return i % 2 ? '#f40' : 'green';
			});
	});
	let items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
</script>

<svg width="960" height="600" id="main">
	{#each items as item, index}
		<p>{index + 1} + {item}</p>
	{/each}
</svg>
